package com.blb.controller;

import com.blb.pojo.ColumnManagement;
import com.blb.service.ColumnManagementService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@CrossOrigin(origins = "*")
@Api(tags = "栏目管理表")
public class ColumnManagementController {

    @Autowired
    private ColumnManagementService columnManagementService;

    @ApiOperation(value = "导航栏")
    @GetMapping("/columnManagement")
    public ResponseEntity<List<ColumnManagement>> findAll(){
        List<ColumnManagement> allOneColumn = columnManagementService.findAllOneColumn();
        return ResponseEntity.ok(allOneColumn);
    }
}
